#ifndef FRIENDREQUESTWIDGET_H
#define FRIENDREQUESTWIDGET_H

#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QComboBox>
#include <QPushButton>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonDocument>
#include "protocol.h"
#include <QJsonDocument>
namespace Ui {
class FriendRequestWidget;
}

class FriendRequestWidget : public QWidget
{
    Q_OBJECT

public:
    explicit FriendRequestWidget(QWidget *parent = nullptr);
    ~FriendRequestWidget();

    void SetUserName(QString Un);

    void InitForUi();

    void LinkUiToUiSignalAndSlot();

    void LinkTcpSignalAndSlot();
private:
    Ui::FriendRequestWidget *ui;

    QLabel      *userInfoLabel;
    QLineEdit   *verifyMsgEdit;
    QLineEdit   *remarkEdit;
    QComboBox   *groupComboBox;
    QComboBox   *permissionComboBox;
    QPushButton *sendBtn;
    QPushButton *cancelBtn;
    QString     UserName;
public slots:
    void SendFriendRequest();
signals:
    //void sig_FriendInfoPull(myuint Type,QJsonObject Info);
    void EmitFriendRequest(QString UserName,int div,QJsonObject Info);

    void Sig_AddFriendRequest(myuint Type,QJsonObject Info);


};

#endif // FRIENDREQUESTWIDGET_H
